<?php
	include 'connect.php';
    if (is_numeric($_GET['id'])) {
        $id = $_GET['id'];
        $nav_nome = mysql_real_escape_string(htmlspecialchars($_POST['nav_nome']));
        $nav_url = mysql_real_escape_string(htmlspecialchars($_POST['nav_url']));
        mysql_query("UPDATE navbar SET nav_nome='$nav_nome', nav_url='$nav_url' WHERE id='$id'") or die(mysql_error()); 
        echo '<script language=javascript>document.location.href="./../navbar.php"</script>';
	}
?>